﻿using System;
using System.Security;
using System.Security.Permissions;

namespace Codemonk.Common.Data
{
    public interface IDbAccessor : IDbCommandCreater, IDbConnectionCreater,
                         IExecuteNonQueryable, IDbDataReaderQueryable, IExecuteScalarQueryable,
                         IDbDataAdapterCreater, IDataParameterCreater, IDataSetFillble
                         , IDisposable
    {
        /// <summary>
        /// 设置该访问器的各项生成工厂
        /// </summary>
        System.Data.Common.DbProviderFactory ProviderFactory
        {
            get;
            set;
        }
 
        System.Data.Common.DbDataSourceEnumerator CreateDataSourceEnumerator();
        CodeAccessPermission CreatePermission(PermissionState state);

        string ProviderInvariantName { get; set; }

    }
}
